
from .api_verify import ApiVerify

from flask import Flask, request, Blueprint

from . import app_verify_code

import random

@app_verify_code.route('/verify_code', methods=['GET', 'POST'])
    
def verify():

    methods = request.method

    info = request.args

    openid = info.get('openid')

    verify_code = info.get('verify_code')

    with ApiVerify() as conn_api:

        result_info = conn_api.verify_code(methods, openid, verify_code)

    return result_info

